package com.remenote.remenoteback.entity.doo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.bind.DefaultValue;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import jakarta.persistence.*;

import java.io.Serializable;
import java.util.Date;

/**
 * 笔记;undefined
 *
 * @author : http://www.chiner.pro
 * @date : 2024-3-16
 */
@Getter
@Setter
@Entity
@Table(name = "NOTE")
@Accessors(chain = true)
@ToString
@EntityListeners(AuditingEntityListener.class)
public class NoteDo implements Serializable, Cloneable {
 
    private String tenantId;
 
    private Integer revision;
 
    @CreatedBy
    private String createdBy;
 
    @CreatedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;
 
    @LastModifiedBy
    private String updatedBy;
 
    @LastModifiedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;
 
    @Id
    @GeneratedValue
    private Integer id;
    private String username;
    private String notebook;
    private Integer notebookId;
    private String noteTitle;
    private String noteContent;
    private Boolean isPublic=false;
    private Boolean isDelete=false;


}